import React, { useEffect } from 'react';
// import useEffSearchParams from 'react-router-dom'
import { useParams, useNavigate } from 'react-router-dom'

const Index = () => {
    const navigate = useNavigate()
    // let [query] = useEffSearchParams()
    let params = useParams()
    useEffect(() => {
        return () => {
            // console.log(query.get('id'));
            console.log(params);
        };
    }, []);
    return (
        <div>
            detail
            <button onClick={() => { navigate(-1) }}>返回前一个页面</button>
        </div>
    );
}

export default Index;
